#ifndef WIN32TIME_H
#define WIN32TIME_H

#include "Time.h"

namespace GenBen {

class Win32Time : public Time
{
public:
	Win32Time();
	~Win32Time();

	virtual uint getTimeMs() { return current_time_ms; };
	virtual uint getDeltaTimeMs() { return d_time_ms; };
	virtual float getTimeScale() { return time_scale; };

	virtual uint getFps() { return fps; };
	virtual void setFpsLimit(uint fps) { fps_limit = fps; };

	virtual string timeToString(uint time);

	void update();
private:
	uint perfCounterToMs(uint64 time);

	uint64 perf_frequency, start_time, current_time;
	uint old_time_ms, current_time_ms, d_time_ms;
	float time_scale;

	uint last_fps_update, frames_drawn, fps, fps_limit;
};

} // namespace

#endif
